<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Insert title here</title>

<script type="text/javascript" src="http://www.amcharts.com/lib/3/amcharts.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/3/pie.js"></script>
<script type="text/javascript" src="http://www.amcharts.com/lib/3/themes/pattern.js"></script>
<script src="js/jquery.min.js"></script>
<style type="text/css">
#chartdiv {
	width		: 100%;
	height		: 500px;
	font-size	: 11px;
}
</style>
</head>
<body>
<div id="chartdiv"></div>
<script type="text/javascript">
var reportData = [];

$.getJSON("/ComplaintReg/rest/service/getReportByDept", function(data) {
	$.each(data, function(key, value){
		reportData.push(value);
	});
	
	var chart = AmCharts.makeChart("chartdiv", {
	    "type": "pie",
		"theme": "none",
	    "dataProvider": reportData,
	    "valueField": "value",
	    "titleField": "Label",
	    "radius": "42%",
	    "innerRadius": "60%",
		"exportConfig":{	
	      menuItems: [{
	      icon: '/lib/3/images/export.png',
	      format: 'png'	  
	      }]  
		}
	});
}); 


/* $.ajax({
	type : "GET",
	url : "/ComplaintReg/rest/service/getReportByDept",
	success : function(data) {
		
		
		
	}
}); */




</script>


</body>
</html>